﻿
$(document).ready(function() {
    jQuery("#testTable").jqGrid({
        url: 'TestService.asmx/Test',
        datatype: 'xml',
        mtype: 'POST',
        colNames: ['anInteger', 'aDateTime', 'aString', 'aDecimal'],
        colModel: [
        { name: 'anInteger', index: 'anInteger', width: 200, align: 'center', xmlmap: "anInteger" },
        { name: 'aDateTime', index: 'aDateTime', width: 200, align: 'center', xmlmap: "aDateTime" },
        { name: 'aString', index: 'aString', width: 200, align: 'center', xmlmap: "aString" },
        { name: 'aDecimal', index: 'aDecimal', width: 200, align: 'center', xmlmap: "aDecimal" }
        ],
        sortname: 'anInteger',
        sortorder: "desc",
        viewrecords: true,
        imgpath: 'Scripts/themes/basic/images',
        caption: 'My first grid',
        xmlReader: {
            root: "ArrayOfTestData",
            row: "TestData",
            repeatitems: false
        }
    });
});